package o;

import java.util.Arrays;

final class agl {
    public int ˊ;
    private boolean ˋ;
    private final int ˎ;
    private boolean ˏ;
    public byte[] ॱ;

    public agl(int i, int i2) {
        this.ˎ = i;
        this.ॱ = new byte[(i2 + 3)];
        this.ॱ[2] = (byte) 1;
    }

    public void ˎ() {
        this.ˋ = false;
        this.ˏ = false;
    }

    public boolean ॱ() {
        return this.ˏ;
    }

    public void ˎ(int i) {
        boolean z = true;
        amm.ˏ(!this.ˋ);
        if (i != this.ˎ) {
            z = false;
        }
        this.ˋ = z;
        if (this.ˋ) {
            this.ˊ = 3;
            this.ˏ = false;
        }
    }

    public void ˊ(byte[] bArr, int i, int i2) {
        if (this.ˋ) {
            int i3 = i2 - i;
            if (this.ॱ.length < this.ˊ + i3) {
                this.ॱ = Arrays.copyOf(this.ॱ, (this.ˊ + i3) * 2);
            }
            System.arraycopy(bArr, i, this.ॱ, this.ˊ, i3);
            this.ˊ = i3 + this.ˊ;
        }
    }

    public boolean ॱ(int i) {
        if (!this.ˋ) {
            return false;
        }
        this.ˊ -= i;
        this.ˋ = false;
        this.ˏ = true;
        return true;
    }
}
